import request from '@/utils/request'

// 查询OSS服务商列表
export function listProvider(query) {
  return request({
    url: '/cms/oss/provider/list',
    method: 'get',
    params: query
  })
}

// 查询OSS服务商列表
export function listProviderAll() {
  return request({
    url: '/cms/oss/provider/listAll',
    method: 'get'
  })
}

// 查询OSS服务商详细
export function getProvider(id) {
  return request({
    url: '/cms/oss/provider/' + id,
    method: 'get'
  })
}

// 新增OSS服务商
export function addProvider(data) {
  return request({
    url: '/cms/oss/provider',
    method: 'post',
    data: data
  })
}

// 修改OSS服务商
export function updateProvider(data) {
  return request({
    url: '/cms/oss/provider',
    method: 'put',
    data: data
  })
}

// 删除OSS服务商
export function delProvider(id) {
  return request({
    url: '/cms/oss/provider/' + id,
    method: 'delete'
  })
}

// 锁定服务商
export function lockProvider(id) {
  return request({
    url: '/cms/oss/provider/lock/' + id,
    method: 'post',
  })
}
